<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <!--<link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">-->
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">

	</head>
	<body>
		<form action="" method="post">
		
			<table class="table table-hover">

				<tr class="active">
				  <th width="150">ID</th>
				{{foreach from="$data" value="$v"}}
				  <th width="150">{{$v['taname']}}</th>
				{{endforeach}}
				  <th>库存</th>
				  <th>货号</th>
				  <th>操作</th>
				</tr>
				{{foreach from="$goodListData" value="$v"}}
				<tr>
					
					<td>{{$v['glid']}}</td>
					{{foreach from="$v['value']" value="$u"}}
						<td>{{$u['gtvalue']}}</td>
					{{endforeach}}

					<td>{{$v['inventory']}}</td>
					<td>{{$v['number']}}</td>
					<td class="edit">
						<a href='{{U('GoodsList/edit',array('glid'=>$v['glid'],'tid'=>Q('get.tid'),'aid'=>Q('get.aid')))}}' class="btn btn-sm btn-warning" />修改</a>
						<a class="btn btn-danger" href="JavaScript:if(confirm('确定删除吗?')) location.href='{{U('GoodsList/del',array('glid'=>$v['glid']))}}';">删除</a>

					</td>
				</tr>
				{{endforeach}}
				
					<tr class="refer">
						<td>添加货品</td>
						{{foreach from="$data" value="$v"}}
							<td>
								
								<select name="combine[]" class="form-control">
									<option value="">-请选择-</option>
									{{foreach from="$v['value']" value='$u'}}
										<option value="{{$u['gtid']}}">{{$u['gtvalue']}}</option>
									{{endforeach}}
								</select>
							</td>

						{{endforeach}}
						<td>
							<input type="text" name="inventory" id="inventory" class="form-control" value="" placeholder="库存量"/>
						</td>
						<td>
							<input type="text" name="number" id="number" class="form-control" value="" placeholder="货品货号" />
						</td>
						
						<td>
							
							<input type="hidden" name="goods_aid" id="goods_aid" value="{{Q("get.aid")}}" />
							<input type="submit" class="btn btn-primary btn-block" name="" />
						</td>
					</tr>
					
					
					
			</table>
			
		</form>
	</body>
</html>
